<?php 

?>
<div id="fav_container" style="margin:0px auto; width:1000px; margin-bottom:10px; font-size:14px"><!--
--><div style="display:inline-block;">收藏相关：</div><!--
--><div style="display:inline-block;">
  全部<input type="checkbox" value="" style=""  /> 
  收藏<input type="checkbox" value="1" style="" /> 
  未收<input type="checkbox" value="2" style=""  /> 
  </div><!--
--></div>
<script language="javascript">
function getFavParam(){
	var checkboxs = $('#fav_container').find('input');
	
	if($(checkboxs[1]).is(':checked') && $(checkboxs[2]).is(':checked')){
		return "all";	
	}else if($(checkboxs[1]).is(':checked') && !$(checkboxs[2]).is(':checked')){
		return "1";	
	}else if(!$(checkboxs[1]).is(':checked') && $(checkboxs[2]).is(':checked')){
		return "2";	
	}else{
		return "0";	
	}
}

(function(){
		  
	var fav = "<?php echo (isset($fav) && !empty($fav)) ? $fav : "";?>";
	var checkboxs = $('#fav_container').find('input');
	//console.log(getFavParam());
	
	if(fav == "all"){
		$(checkboxs[1]).attr("checked", true);
		$(checkboxs[2]).attr("checked", true);
	}else if(fav == "1"){
		$(checkboxs[1]).attr("checked", true);
	}else if(fav == "2"){
		$(checkboxs[2]).attr("checked", true);
	}
	
})();

</script>
